package com.yfp.operation.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yfp.common.datascope.annotation.DataScope;
import com.yfp.operation.domain.PositionDO;
import com.yfp.operation.domain.dto.AssociationDTO;
import com.yfp.operation.domain.dto.UserLayerDTO;
import com.yfp.operation.mapper.PositionMapper;
import com.yfp.operation.service.PositionService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
*
* @description 针对表【position(点位表)】的数据库操作Service实现
* @createDate 2024-05-14 20:18:47
*/
@Service
public class PositionServiceImpl extends ServiceImpl<PositionMapper, PositionDO> implements PositionService {

    @Resource
    private PositionMapper positionMapper;

    @Override
    public PositionDO getById(String id) {
        return positionMapper.getById(id);
    }

    @Override
    public List<PositionDO> findAll() {
        return positionMapper.findAll();
    }

    @DataScope(deptAlias = "p,m")
    @Override
    public List<PositionDO> userLayerList(UserLayerDTO userLayerDTO) {
        return positionMapper.userLayerList(userLayerDTO);
    }

    @Override
    public AssociationDTO startTime(String positionId) {
        return positionMapper.startTime(positionId);
    }
}




